#pragma once

#include "entity.h"

class Chest : public Entity
{

public:

	Chest(void);
	~Chest(void);

	// Update
	void Update(float elapsed);

	// Draw
	void Render();

	// Check collision
	bool CheckCollision(IEntity* base);

	// Get the current state
	unsigned char GetState(void);

private:

	// Available states
	enum State {CLOSED, OPEN, BROKE};

	// The current state
	State CurrentState;

	// The image id
	static int ImageID;

	// Number of loaded chests
	static int Count;

	// Is a player near
	bool PlayerNear;

	// Is the player trying to open it
	bool InGame;

	// Used to determine if player near is the first or second player
	int playerNum;

	static int buttonA;

};

